<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a4j="http://richfaces.org/a4j" 
	xmlns:rich="http://richfaces.org/rich"
	xmlns:mir="http://www.miranteinfo.com/seam/taglib"
	xmlns:mirfn="http://www.miranteinfo.com/seam/functions">
	
<ui:composition>
	
	<a4j:outputPanel id="#{id}" rendered="#{mirfn:getDefaultValue(rendered, true)}">
		
		<a4j:loadScript src="resource://com/miranteinfo/seam/facelets/js/jquery.meiomask.js"/>
		
		<rich:jQuery selector="##{id}Input" query="setMask({mask:'99.999.999/9999-99', autoTab : #{not empty autoTab ? autoTab : false}})" timing="onload"/>
		<rich:jQuery selector="##{id}Input" query="setMask({mask:'99.999.999/9999-99', autoTab : #{not empty autoTab ? autoTab : false}})" timing="immediate"/>
		
		<h:inputText id="#{id}Input"
					 value="#{value}"
					 accesskey="#{accesskey}"
					 alt="#{alt}"
					 autocomplete="#{mirfn:getDefaultValue(autocomplete,'off')}"
					 disabled="#{mirfn:getDefaultValue(disabled, false)}"
					 immediate="#{mirfn:getDefaultValue(immediate, false)}"
					 label="#{label}"
					 readonly="#{mirfn:getDefaultValue(readonly, false)}"
					 required="#{mirfn:getDefaultValue(required, false)}"
					 size="#{size}"
					 style="#{style}"
					 styleClass="#{styleClass}"
					 tabindex="#{tabindex}"
					 title="#{title}"
					 converter="com.miranteinfo.CnpjConverter"
					 validator="com.miranteinfo.CnpjValidator">
					
			<ui:insert/>
					
		</h:inputText>
		
	</a4j:outputPanel>
	
</ui:composition>
</html>
